﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KBVault.DAL.Repository;
using KBVault.Web.Infrastructure;

namespace KBVault.Web.Application.UC.Categories
{
    public partial class ListCategory :  KBVaultBaseUserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                try
                {
                    rptCategories.DataSource = CategoryRepository.List();
                    rptCategories.DataBind();
                }
                catch (Exception ex)
                {
                    Log.Error(ex.Message);
                    ShowExceptionMessage();
                }
            }
        }

        protected void rptCategories_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {

        }
    }
}